import React, {FC} from 'react';
import {Text, StyleSheet} from 'react-native';
type PropsType = {
  count: number;
};
const Unread: FC<PropsType> = (props: PropsType) => {
  const {count} = props;
  return <Text style={styles.txt}>{count > 99 ? '99+' : count}</Text>;
};

const styles = StyleSheet.create({
  txt: {
    position: 'absolute',
    top: -6,
    right: -10,
    backgroundColor: '#ff2442',
    paddingHorizontal: 8,
    height: 24,
    borderRadius: 12,
    fontSize: 12,
    textAlign: 'center',
    textAlignVertical: 'center',
    color: 'white',
  },
});
export default Unread;
